package com.cs.contract.controller;

import com.cs.contract.service.CsLineItemsService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：zrx
 * @Package：com.cs.controller
 * @Project：RuoYi-Cloud
 * @name：CsLineItemsController
 * @Date：2024/11/22 16:33
 * @Filename：CsLineItemsController
 */
@RestController
@RequestMapping("/items")
public class CsLineItemsController extends BaseController {
    private final CsLineItemsService csLineItemsService;

    public CsLineItemsController(CsLineItemsService csLineItemsService) {
        this.csLineItemsService = csLineItemsService;
    }

    /**
     * 查询框架计划内的设备信息
     */
    @GetMapping("/selectItemsDevice")
    public TableDataInfo selectItemsDevice(Integer jhId) {
        System.out.println("jhid:"+jhId);
        System.out.println(getDataTable(csLineItemsService.listItemsDevice(jhId)).getRows());
        return getDataTable(csLineItemsService.listItemsDevice(jhId));
    }

    /**
     * 查询非招标对应的产品信息
     */
    @GetMapping("/getItemsDevice")
    public TableDataInfo selectItemsDevice2(String aid) {
        return getDataTable(csLineItemsService.listItemsDevice2(aid));
    }
}
